package fw.communication.api;

/**
 * ICommunicationLayer is an interface defining the communication layer for the Smart Framework
 * 
 * @author Andrei Penchev
 */
public interface ICommunicationLayer {

	/**
	 * This method is called when a message is received
	 * @param message the received message
	 */
	public void receiveMessage(ProtocolDataMessage message);
	
	/**
	 * This method is called when the client wants to send a message
	 * @param message the message to be send
	 */
	public boolean sendMessage(ProtocolDataMessage message);
	
	/**
	 * This method is called to subscribe for responses
	 * @param message the subscriber implementation
	 */
	public void setSubscriber(IResponseSubscriber resSubsriber);
}
